<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #bk{
            background-color: red;
            height: 40px;
            width: 1200px;
            position: relative;
        }
        #del{
            background-color: #ccc;
            height: 20px;
            width: 20px;
            position: absolute;
            right: 0px;
            top: 0px;
        }
    </style>
</head>
<body>
    <div id="bk" class="bk">
        <div id="del" class="del"></div>
    </div>
    <script>
        var del = document.querySelector('.del');
        var bk = document.querySelector('.bk');

        del.onclick = function(){
            bk.style.display='none';
        }
    </script>
</body>
</html>